{% extends "base.html" %}

{% block title %}预约信息 - 万岛潜水{% endblock %}

{% block content %}
<div class="container mt-5">
    <div class="row">
        <div class="col-md-10 offset-md-1">
            <h2 class="text-center mb-4">选择您想预约的课程</h2>
            
            <div class="row">
                {% for course in courses %}
                <div class="col-md-4 mb-4">
                    <div class="card h-100">
                        <img src="{{ url_for('static', filename='uploads/' + course.image) if course.image and course.image != 'default.jpg' else url_for('static', filename='img/default-course.jpg') }}" class="card-img-top" alt="{{ course.name }}">
                        <div class="card-body">
                            <h5 class="card-title">{{ course.name }}</h5>
                            <p class="card-text">{{ course.description|truncate(100) }}</p>
                            <p class="card-text"><strong>价格:</strong> ¥{{ course.price }}</p>
                            <p class="card-text"><strong>难度:</strong> {{ course.difficulty }}</p>
                            <p class="card-text"><strong>时长:</strong> {{ course.duration }}</p>
                            <a href="{{ url_for('main.booking', course_id=course.id) }}" class="btn btn-primary">预约此课程</a>
                        </div>
                    </div>
                </div>
                {% endfor %}
            </div>
            
            <div class="text-center mt-4">
                <p>如果您对课程有任何疑问，请随时联系我们</p>
                <a href="{{ url_for('main.contact') }}" class="btn btn-outline-primary">联系我们</a>
            </div>
        </div>
    </div>
</div>
{% endblock %} 